package validator;

import java.util.ResourceBundle;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

public class e {
    public static void exibirMsgSucesso(String detail) {
		exibirMsg("Sucess", detail, FacesMessage.SEVERITY_INFO);
	}

	public static void exibirMsgErro(String detail) {
		exibirMsg(detail, detail, FacesMessage.SEVERITY_ERROR);
	}

	private static void exibirMsg(String summary, String detail, FacesMessage.Severity severity) {
		FacesMessage facesMessage = new FacesMessage(severity, summary, detail);
		FacesContext.getCurrentInstance().addMessage(null, facesMessage);
	}
}
